<?php

/**
 * Project form base class.
 *
 * @package    virtualstore
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormBaseTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
abstract class BaseFormDoctrine extends sfFormDoctrine
{
  public function setup()
  {
  }

  protected function resetStamps(){
        //Reset created_at to ReadOnly
        $this->setWidget('created_at',
                new sfWidgetFormPlain(
                array('value' =>$this->getObject()->getCreatedAt())));
        unset($this->validatorSchema['created_at']);

        //Reset updated at to ReadOnly
        $this->setWidget('updated_at',
                new sfWidgetFormPlain(
                array('value' =>$this->getObject()->getUpdatedAt())));
        unset($this->validatorSchema['updated_at']);

        //Reset updated  by at to ReadOnly with username
        $this->setWidget('updated_by',
                new sfWidgetFormPlain(
                array('value' =>$this->getObject()->getUpdatedBy())));
       unset($this->validatorSchema['updated_by']);

       //Reset created by at to ReadOnly with username
       $this->setWidget('created_by',
                new sfWidgetFormPlain(
                array('value' =>$this->getObject()->getUpdatedBy())));
       unset($this->validatorSchema['created_by']);
  }
}
